package com.wwp.tbshop.view.fragment;


import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.wwp.tbshop.R;
import com.wwp.tbshop.activity.AboutActivity;
import com.wwp.tbshop.activity.HelpingActivity;
import com.wwp.tbshop.activity.SuggustActivity;
import com.wwp.tbshop.view.fragment.diyview.MoreItemView;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;


/**
 * Created by 楠GG on 2017/6/15.
 */

public class MoreFragment extends Fragment {


    @Bind(R.id.suggest)
    MoreItemView mSuggest;
    @Bind(R.id.recond)
    MoreItemView mRecond;
    @Bind(R.id.help)
    MoreItemView mHelp;
    @Bind(R.id.about)
    MoreItemView mAbout;
    private Context mContext;


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
        View view = View.inflate(getActivity(), R.layout.activity_more, null);
        mContext = getActivity();
        ButterKnife.bind(this, view);
        return view;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }


    @OnClick({R.id.suggest, R.id.recond, R.id.help, R.id.about})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.suggest:
                Intent intent = new Intent(mContext, SuggustActivity.class);
                mContext.startActivity(intent);
                break;
            case R.id.recond:
                break;
            case R.id.help:
                Intent intent1 = new Intent(mContext, HelpingActivity.class);
                mContext.startActivity(intent1);
                break;
            case R.id.about:
                Intent intent2=new Intent(mContext, AboutActivity.class);
                mContext.startActivity(intent2);
                break;
        }
    }
}
